{% extends "base.html" %}
{% load fundraising_extras release_notes staticfiles %}

{% block sectionid %}download{% endblock %}
{% block title %}Download Django{% endblock %}
{% block layout_class %}sidebar-right{% endblock %}

{% block header %}
  <h1>Download</h1>
{% endblock %}

{% block content %}
  <h1>How to get Django</h1>
  <p>Django is available open-source under the
    <a href="https://github.com/django/django/blob/master/LICENSE">BSD license</a>.
    We recommend using the latest version of Python 3. The last version to
    support Python 2.7 is Django 1.11 LTS. See <a href="
    {% url 'document-detail' lang='en' version='dev' url='faq/install' host 'docs' %}#what-python-version-can-i-use-with-django">
    the FAQ</a> for the Python versions supported by each version of Django.
    Here’s how to get it:</p>

  <h2>Option {% cycle '1' '2' '3' as options %}: Get the latest official version</h2>
  <p>The latest official version is {{ current.version }}. Read the
    {% release_notes current.version show_version=True %}, then install it with
    <a href="https://pip.pypa.io/en/latest/">pip</a>:</p>
  <pre class="literal-block"><code>pip install Django=={{ current.version }}</code></pre>

  {% if preview %}
      {% with preview.version|slice:":3" as major_version %}
      <h2>Option {% cycle options %}: Get the {{ preview.get_status_display }} for {{ major_version }}</h2>
      <p>As part of the
        <a href="https://code.djangoproject.com/wiki/Version{{ major_version }}Roadmap">
        Django {{ major_version }} development process</a>, Django
        {{ preview.version }} is available. This release is only for users who
        want to try the new version and help identify remaining bugs before the
        {{ major_version }} release. Please read the
        {% release_notes preview.version show_version=True %} before using this package.
      <p>Install the {{ preview.get_status_display }} with <a href="https://pip.pypa.io/">pip</a>:</p>
      <pre class="literal-block"><code>pip install --pre django</code></pre>
      {% endwith %}
  {% endif %}

  <h2>Option {% cycle options %}: Get the latest development version</h2>
  <p>The latest and greatest Django version is the one that’s in our Git repository (our revision-control system). This is only for experienced users who want to try incoming changes and help identify bugs before an official release. Get it using this shell command, which requires <a href="https://git-scm.com/">Git</a>:</p>
  <p class="literal-block"><code>git clone https://github.com/django/django.git</code></p>
  <p>You can also download <a href="https://github.com/django/django/archive/master.tar.gz">
    a gzipped tarball</a> of the development version. This archive is updated
    every time we commit code.</p>

  <h2>After you get it</h2>
  <p>See the <a href="{% url 'document-detail' lang='en' version='stable' url='intro/install' host 'docs' %}">installation guide</a> for further instructions. Make sure you read the documentation that corresponds to the version of Django you’ve just installed.</p>
  <p>And be sure to sign up for the <a href="https://groups.google.com/group/django-users">django-users mailing list</a>, where other Django users and the Django developers themselves all hang out to help each other.</p>

  <h2 id="supported-versions">Supported Versions</h2>
  <p><strong>Feature releases</strong> (A.B, A.B+1, etc.) will happen roughly every eight months.
    These releases will contain new features, improvements to existing features, and such.</p>
  <p><strong>Patch releases</strong> (A.B.C, etc.) will be issued as needed, to
    fix bugs and/or security issues. These releases will be 100% compatible with
    the associated feature release, unless this is impossible for security
    reasons or to prevent data loss. So the answer to "should I upgrade to the
    latest patch release?” will always be "yes."</p>
  <p>Certain feature releases will be designated as <strong>long-term support
    (LTS) releases</strong>. These releases will get security and data loss
    fixes applied for a guaranteed period of time, typically three years.</p>
  <p>See the <a href="https://docs.djangoproject.com/en/dev/internals/release-process/#supported-versions">
    supported versions policy</a> for detailed guidelines about what fixes will be backported.</p>

  <img src="{% static "img/release-roadmap.png" %}" style="max-width:100%;" alt="">
  <hr style="margin-bottom: 20px;">

  <table class='django-supported-versions'>
      <tr>
        <th>Release Series</th>
        <th>Latest Release</th>
        <th>End of mainstream support<sup><a href="#ft1">1</a></sup></th>
        <th>End of extended support<sup><a href="#ft2">2</a></sup></th>
      </tr>
      <tr>
        <td>2.1</td>
        <td>{% get_latest_micro_release '2.1' %}</td>
        <td>April 2019</td>
        <td>December 2019</td>
      </tr>
      <tr>
        <td>2.0</td>
        <td>{% get_latest_micro_release '2.0' %}</td>
        <td>August 1, 2018</td>
        <td>April 2019</td>
      </tr>
      <tr>
        <td>1.11 LTS <sup><a href="#ft3">3</a></sup></td>
        <td>{% get_latest_micro_release '1.11' %}</td>
        <td>December 2, 2017</td>
        <td>Until at least April 2020</td>
      </tr>
      <tr class="unsupported">
        <td>1.10</td>
        <td>{% get_latest_micro_release '1.10' %}</td>
        <td>April 4, 2017</td>
        <td>December 2, 2017</td>
      </tr>
      <tr class="unsupported">
        <td>1.9</td>
        <td>{% get_latest_micro_release '1.9' %}</td>
        <td>August 1, 2016</td>
        <td>April 4, 2017</td>
      </tr>
      <tr class="unsupported">
        <td>1.8 LTS</td>
        <td>{% get_latest_micro_release '1.8' %}</td>
        <td>December 1, 2015</td>
        <td>April 1, 2018</td>
      </tr>
      <tr class="unsupported">
        <td>1.7</td>
        <td>{% get_latest_micro_release '1.7' %}</td>
        <td>April 1, 2015</td>
        <td>December 1, 2015</td>
      </tr>
      <tr class="unsupported">
        <td>1.6</td>
        <td>{% get_latest_micro_release '1.6' %}</td>
        <td>September 2, 2014</td>
        <td>April 1, 2015</td>
      </tr>
      <tr class="unsupported">
        <td>1.5</td>
        <td>{% get_latest_micro_release '1.5' %}</td>
        <td>November 6, 2013</td>
        <td>September 2, 2014</td>
      </tr>
      <tr class="unsupported">
        <td>1.4 LTS</td>
        <td>{% get_latest_micro_release '1.4' %}</td>
        <td>February 26, 2013</td>
        <td>October 1, 2015</td>
      </tr>
      <tr class="unsupported">
        <td>1.3</td>
        <td>{% get_latest_micro_release '1.3' %}</td>
        <td>March 23, 2012</td>
        <td>February 26, 2013</td>
      </tr>
  </table>

  <p>Here's what the future roadmap looks like:</p>

  <table class='django-supported-versions'>
    <tr>
      <th>Release Series</th>
      <th>Release Date</th>
      <th>End of mainstream support<sup><a href="#ft1">1</a></sup></th>
      <th>End of extended support<sup><a href="#ft2">2</a></sup></th>
    </tr>
    <tr>
      <td>2.2 LTS</td>
      <td>April 2019</td>
      <td>December 2019</td>
      <td>Until at least April 2022</td>
    </tr>
    <tr>
      <td>3.0</td>
      <td>December 2019</td>
      <td>August 2020</td>
      <td>April 2021</td>
    </tr>
    <tr>
      <td>3.1</td>
      <td>August 2020</td>
      <td>April 2021</td>
      <td>December 2021</td>
    </tr>
    <tr>
      <td>3.2 LTS</td>
      <td>April 2021</td>
      <td>December 2021</td>
      <td>Until at least April 2024</td>
    </tr>
  </table>

  <p style="max-width: 720px;">
    <sup id="ft1">[1] Security fixes, data loss bugs, crashing bugs, major functionality
    bugs in newly-introduced features, and regressions from older versions of Django.</sup><br>
    <sup id="ft2">[2] Security fixes and data loss bugs.</sup><br>
    <sup id="ft3">[3] Last version to support Python 2.7.</sup>
  </p>

{% endblock %}

{% block content-related %}

<h1 class="visuallyhidden">Additional information</h1>
<div role="complementary">

    {% donation_snippet %}

    <h2>For the impatient:</h2>
    <ul>
      <li>Latest release:
        <a href="{% url 'download-redirect' current.version 'tarball' %}">
          Django-{{ current.version }}.tar.gz</a><br>
        Checksums: <a href="{% url 'download-redirect' current.version 'checksum' %}">
          Django-{{ current.version }}.checksum.txt</a><br>
        Release notes: {% release_notes current.version %}
      </li>

      {% if preview %}
      <li>Preview release:
        <a href="{% url 'download-redirect' preview.version 'tarball' %}">
          Django-{{ preview.version }}.tar.gz</a><br>
          Checksums: <a href="{% url 'download-redirect' preview.version 'checksum' %}">
            Django-{{ preview.version }}.checksum.txt</a><br>
          Release notes: {% release_notes preview.version %}
      </li>
      {% endif %}
    </ul>

    <h2>Which version is better?</h2>
    <p>We improve Django almost every day and are pretty good about keeping the code stable. Thus, using the latest development code is a safe and easy way to get access to new features as they’re added. If you choose to follow the development version, keep in mind that there will occasionally be backwards-incompatible changes. You’ll want to pay close attention to the commits by watching <a href="https://github.com/django/django">Django on GitHub</a> or subscribing to <a href="https://groups.google.com/group/django-updates">django-updates</a>.</p>

    <p>If you’re just looking for a stable deployment target and don’t mind waiting for the next release, you’ll want to stick with the latest official release (which will always include detailed notes on any changes you’ll need to make while upgrading).</p>
    <h2>Previous releases</h2>
    <ul>
      <li>Django {{ previous.version }}{% if previous.is_lts %} (LTS){% endif %}:
        <a href="{% url 'download-redirect' previous.version 'tarball' %}">
          Django-{{ previous.version }}.tar.gz</a><br>
        Checksums: <a href="{% url 'download-redirect' previous.version 'checksum' %}">
          Django-{{ previous.version }}.checksum.txt</a><br>
        Release notes: {% release_notes previous.version %}
      </li>
      {% if lts %}
        <li>Django {{ lts.version }} (LTS):
          <a href="{% url 'download-redirect' lts.version 'tarball' %}">
            Django-{{ lts.version }}.tar.gz</a><br>
        Checksums: <a href="{% url 'download-redirect' lts.version 'checksum' %}">
          Django-{{ lts.version }}.checksum.txt</a><br>
          Release notes: {% release_notes lts.version %}
        </li>
      {% endif %}
    </ul>

    <h2>Unsupported previous releases (no longer receive security updates or bug fixes)</h2>
    <ul>
      {% for release in unsupported %}
      <li>Django {{ release.version }}:
        <a href="{% url 'download-redirect' release.version 'tarball' %}">
          Django-{{ release.version }}.tar.gz</a><br>
        Checksums: <a href="{% url 'download-redirect' release.version 'checksum' %}">
          Django-{{ release.version }}.checksum.txt</a></li>
      {% endfor %}
    </ul>

  </div>

{% endblock %}
